Try setting up docs.rs capable build
authorFelix Krull <f_krull@gmx.de>
Wed, 17 Oct 2018 20:17:07 +0000 (22:17 +0200)
committerColin Walters <walters@verbum.org>
Fri, 6 May 2022 16:53:53 +0000 (12:53 -0400)
rust-bindings/rust/.gitlab-ci.yml
rust-bindings/rust/libostree-sys/Cargo.toml
rust-bindings/rust/libostree-sys/build.rs
rust-bindings/rust/libostree/Cargo.toml

index bc759eb080c037b1d784de1a2efbfe59d324eb84..2c88d1b7bca4dd7ddb7ed63684d0925723cd5527 100644 (file)
@@ -42,7 +42,7 @@ libostree_nightly:
 pages:
   stage: doc
   script:
-  - cargo doc --verbose --all-features
+  - cargo doc --verbose --features dox
   - cp -r target/doc public
   artifacts:
     paths:
index 248f696f69d56400e8a9eef3ed766bd9d947e0eb..5519bcc8d32ee51c3b08f2331d2d9f16cca08328 100644 (file)
@@ -39,14 +39,17 @@ v2018_7 = ["v2018_6"]
 name = "libostree_sys"
 
 [package]
-authors = ["Felix Krull <f_krull@gmx.de>"]
+authors = ["Felix Krull"]
 build = "build.rs"
 categories = ["external-ffi-bindings"]
 description = "FFI bindings to libostree-1"
 documentation = "https://fkrull.gitlab.io/rust-libostree/libostree_sys"
 keywords = ["ffi", "ostree", "libostree"]
 license = "MIT"
-links = "ostree"
+links = "ostree-1"
 name = "libostree-sys"
 repository = "https://gitlab.com/fkrull/rust-libostree"
-version = "0.1.2"
+version = "0.1.3"
+
+[package.metadata.docs.rs]
+features = ["dox"]
index ba199e44a968e4fc73e7bb73689983ecc3024d90..58a32260c5f091861d0e0eff67c6042681490ed8 100644 (file)
@@ -62,6 +62,10 @@ fn find() -> Result<(), Error> {
         return Ok(())
     }
 
+    if cfg!(feature = "dox") {
+        return Ok(())
+    }
+
     let target = env::var("TARGET").expect("TARGET environment variable doesn't exist");
     let hardcode_shared_libs = target.contains("windows");
 
index 5e02e58d21a460b6701823bb03db3c89747c9028..b2104bf3dcb8b9748acbdf37289a2e5816591ed7 100644 (file)
@@ -4,6 +4,9 @@ version = "0.1.0"
 
 documentation = "https://fkrull.gitlab.io/rust-libostree/libostree"
 
+[package.metadata.docs.rs]
+features = ["dox"]
+
 [lib]
 name = "libostree"